package com.qp.basics.estivate.jdbc.datasource;

import com.qp.basics.estivate.Session;

public class SessionHolder {

	private final Session session;

	private boolean transactionActive = false;

	public SessionHolder(Session session) {
		this.session = session;
	}

	public SessionHolder(Session session, boolean transactionActive) {
		this(session);
		this.transactionActive = transactionActive;
	}

	public Session getSession() {
		return this.session;
	}

	protected boolean isTransactionActive() {
		return this.transactionActive;
	}

	protected void setTransactionActive(boolean transactionActive) {
		this.transactionActive = transactionActive;
	}

	public void clear() {
		this.transactionActive = false;
	}
}
